import request from "@/utils/request"

export const mealAll = (search) =>
    request({
        url: "/mealMuchAll",
        method: "get",
        params: {
            value: search.value,
            offset: search.offset,
            limit: search.limit,
        }
    })

export const deleteSetmeal = (id) =>
    request({
        url: "/deleteMealByid" + id,
        method: "delete"
    })

export const addSetmeal = (tmeal) =>
    request({
        url: "/saveSetMeal",
        method: "post",
        data: tmeal,
    })

export const beforetSetMeal = (id) =>
    request({
        url: "/beforeSetMealById" + id,
        method: "post"
    })

export const updateSetMeal = (setmeal) =>
    request({
        url: "/updateSetMeal",
        method: "put",
        data: setmeal
    })